#include "utilityPredefine.h"
#include "Controler.h"


bool ControlerLinker::mouse(int button, int state, int x, int y)
{
	for(CtrlList::iterator ite=ctrlLinker.begin();ite!=ctrlLinker.end();++ite){
		if((*ite)->mouse(button,state,x,y))
			return true;
	}
	return false;
}

bool ControlerLinker::keyboard(unsigned char key, int x, int y)
{
	for(CtrlList::iterator ite=ctrlLinker.begin();ite!=ctrlLinker.end();++ite){
		if((*ite)->keyboard(key,x,y))
			return true;
	}
	return false;
}

bool ControlerLinker::motion(int x,int y)
{
	for(CtrlList::iterator ite=ctrlLinker.begin();ite!=ctrlLinker.end();++ite){
		if((*ite)->motion(x,y))
			return true;
	}
	return false;
}

void ControlerLinker::push_back(Controler* ctrl)
{
	ctrlLinker.push_back(ctrl);
}